#include using namespace std; // 14, 112, 896, 146, 292, 584, 546, 168 void displayGameboard(int xMoves, int oMoves) { int i = 1; for (int r = 0; r < 3; r++) { for (int c = 0; c < 3; c++) { //we should display X if x has moved here // or O if O has moved here // you will need to use the bit cout << i; if (c < 2) { cout << "|"; } i++; } if (r < 2) { cout << endl << "-----" << endl; } } } void main() { int xMoves = 0; int oMoves = 0; char turn = 'X'; bool gameOver = false; int move; while (!gameOver) //true will be replaced with a check to see if the game is over { //display the game board displayGameboard(xMoves, oMoves); //show whose turn it is //ask for input for a move. Make sure it is valid. cin >> move; //apply the move to xMoves or oMoves //check for a win //change whose turn it is } }